-- take_comment_bonus
-- created by cheny3
-- Peter木桌领奖

return {
    doAction = function(action)
        local grid = DungeonM.getGridByPos(action.pos);
        if grid.type ~= GRID_TYPE_COMMENT then
            return false;
        end

        if BuffDataM.query("has_comment", 1) ~= 0 then
            return false;
        end

        -- 标记已经评论过
        BuffDataM.set("has_comment", 1, 1);

        return BuildingBonusM.doEvent(action.pos, true);
    end,
};
